//! @Author: DengLibin 榆霖
//! @Date:  2022-07-05 09:26:03
//! @Description: 

use std::sync::Arc;

use serde::{Serialize, Deserialize};

use crate::entity::{user::User, article::Article};


/// @Author: DengLibin 榆霖
/// @Date:  2022-07-05 09:28:00
/// @Description: 分页信息

#[derive(Debug, Serialize, Deserialize)]
pub struct PageInfo<T> {
    pub page: i32, //页码
    pub size: i32, //每页大小
    pub total: i32, //总数
    pub list: Vec<T>, //列表
}


pub struct DbParam{
    pub pool: Arc<mysql::Pool>, //连接池
    pub page: i32, //页码
    pub size: i32, //每页大小
}

pub struct UserParam {
    pub user: User,
    pub pool: Arc<mysql::Pool>, //连接池
}

pub struct ArticleParam {
    pub article: Article,
    pub pool: Arc<mysql::Pool>, //连接池
}